import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: HomeView,
      children:[
        {
          path: '/index',
          component: () => import('../views/IndexView.vue'),
        },
        {
          path: '/manager-list',
          component: () => import('../views/manager/ManagerListView.vue'),
        },
        {
          path: '/goods-list',
          component: () => import('../views/goods/GoodsListView.vue'),
        },
        {
          path: '/goods-type',
          component: () => import('../views/goods/GoodsTypeView.vue'),
        }
      ]
    },
    {
      path: '/about',
      name: 'about',
      component: () => import('../views/AboutView.vue')
    },
    {
      path: '/login',
      component: () => import('../views/LoginView.vue')
    }
  ]
})

export default router
